define(function(require, exports, module){
	var mycountDetailTemp = require("text!../template/model.html");
	
	module.exports = Nuui.View.extend({
		
		template:mycountDetailTemp,
		
		onRender:function(){
			var view = this;
			
			/*App.request("count/countInfo", {
				success:function(data){
					if(data.ec){
						alert(data.em);
					}else{
						var countInfo = data.countInfo;
						view.$("#inDebt").html(countInfo.inDebt);
						view.$("#totalAmount").html(countInfo.totalAmount);

						var creditCard = countInfo.creditCard,
							debitCard = countInfo.debitCard;
						view.$("#creditNum").text("信用卡（" + creditCard.length + "张）");
						view.$("#debitNum").text("借记卡（" + debitCard.length + "张）");
						
						var tpl= '';
						for(var i = 0; i < creditCard.length; i++){
							tpl += '<li class="ui-view-cell credit" data-index="' + i + '">' +
								'<i class="ico-bnk ' + creditCard[i].icon + '"></i>' +
								'<div class="cell">' +
									'<h1>' + creditCard[i].bankName + '<b>' + creditCard[i].cardNo + '</b></h1>' +
									'<h3>刘小二</h3>' +
								'</div>' +
								'<div class="cell">' +
									'<h1 class="fc-red">' + creditCard[i].amt + '</h1>' +
									'<h3>10月28日还款</h3>' +
								'</div>' +
							'</li>';
						}
						view.$("#credit").html(tpl);

						tpl = '';
						for(var i = 0; i < debitCard.length; i++){
							tpl += '<li class="ui-view-cell debit" data-index="' + i + '">' +
								'<i class="ico-bnk ' + debitCard[i].icon + '"></i>' +
								'<div class="cell">' +
									'<h1>' + debitCard[i].bankName + '<b>' + debitCard[i].cardNo + '</b></h1>' +
									'<h3>刘小二</h3>' +
								'</div>' +
								'<div class="cell">' +
									'<h1 class="fc-blue">' + debitCard[i].amt + '</h1>' +
									'<h3>30分钟前更新</h3>' +
								'</div>' +
							'</li>';
						}
						view.$("#debit").html(tpl);

						view.$(".credit").on("tap", function(){
							var index = $(this).attr("data-index");
							App.storage.set("credit", creditCard[index]);
							App.navigate("example/index/credit", true);
							return false;
						});
						view.$(".debit").on("tap", function(){
							var index = $(this).attr("data-index");
							App.storage.set("debit", debitCard[index]);
							App.navigate("example/index/debitCard", true);
							return false;
						});
						view.$("#addNewCount").on("tap", function(){
							App.navigate("example/index/addNewCount", true);
							return false;
						});
					  }
				  }
			 });*/
		},
		
		onShow:function(){
			 
		}
		
	});	
});